<template>
  <div id="app">
    <el-container>
      <el-header>
        <el-row :gutter="20">
          <el-col :span="18" :offset="3" style="display:flex">
            <div class="logo">
              <img src="./assets/img/logo.png" alt />
              <span>LBBMUSIC</span>
            </div>
            <el-menu mode="horizontal" router :default-active="$route.path">
              <el-menu-item index="/">首页</el-menu-item>
              <el-menu-item index="/singer">歌手</el-menu-item>
              <el-menu-item index="/rank">排行榜</el-menu-item>
              <el-menu-item index="/songList">歌单</el-menu-item>
              <el-menu-item index="/newMusic">新歌</el-menu-item>
            </el-menu>
          </el-col>
        </el-row>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer>Footer</el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  created() {
    console.log(this.$route);
  }
};
</script>

<style lang="less">
body,
html {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}
.el-container {
  .el-header {
    background-color: @main-color;
    .logo {
      cursor: pointer;
      display: flex;
      align-items: center;
      img {
        width: 60px;
      }
      span {
        font-size: 20px;
        font-weight: 800;
        margin: 15px 20px 0;
      }
    }
    .el-menu--horizontal {
      margin-left: 100px;
      border: none;
      & > .el-menu-item {
        line-height: 75px;
        padding: 0 30px;
      }
    }
  }
  main {
    padding: 0;
  }
}
</style>
